let KeyCode = new Array(
  8,
  9,
  12,
  13,
  16,
  17,
  18,
  20,
  27,
  32,
  33,
  34,
  35,
  36,
  37,
  38,
  39,
  40,
  45,
  46,
  48,
  49,
  50,
  51,
  52,
  53,
  54,
  55,
  56,
  57,
  65,
  66,
  67,
  68,
  69,
  70,
  71,
  72,
  73,
  74,
  75,
  76,
  77,
  78,
  79,
  80,
  81,
  82,
  83,
  84,
  85,
  86,
  87,
  88,
  89,
  90,
  186,
  187,
  188,
  189,
  190,
  191,
  192,
  219,
  221,
  222
)

let KeyCodeMapTable = new Map([
  [8, 'BackSpace'],
  [9, 'Tab'],
  [13, 'Enter'],
  [16, 'Shift'],
  [17, 'Control'],
  [18, 'Alt'],
  [20, 'Capslock'],
  [27, 'Esc'],
  [32, 'Spacebar'],
  [33, 'PageUp'],
  [34, 'PageDown'],
  [35, 'End'],
  [36, 'Home'],
  [37, 'LeftArrow'],
  [38, 'UpArrow'],
  [39, 'RightArrow'],
  [40, 'DwArrow'],
  [45, 'Insert'],
  [46, 'Delete'],
  [48, '0'],
  [49, '1'],
  [50, '2'],
  [51, '3'],
  [52, '4'],
  [53, '5'],
  [54, '6'],
  [55, '7'],
  [56, '8'],
  [57, '9'],
  [65, 'A'],
  [66, 'B'],
  [67, 'C'],
  [68, 'D'],
  [69, 'E'],
  [70, 'F'],
  [71, 'G'],
  [72, 'H'],
  [73, 'I'],
  [74, 'J'],
  [75, 'K'],
  [76, 'L'],
  [77, 'M'],
  [78, 'N'],
  [79, 'O'],
  [80, 'P'],
  [81, 'Q'],
  [82, 'R'],
  [83, 'S'],
  [84, 'T'],
  [85, 'U'],
  [86, 'V'],
  [87, 'W'],
  [88, 'X'],
  [89, 'Y'],
  [90, 'Z'],
  [186, ';'],
  [187, '='],
  [188, ','],
  [189, '-'],
  [190, '.'],
  [191, '/'],
  [192, '`'],
  [219, '['],
  [221, ']'],
  [222, "'"],
])

export { KeyCode, KeyCodeMapTable }
